package com.hiep.connect.client;

import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.hiep.connect.shared.MyUser;
import com.hiep.connect.shared.PostingThread;

public interface UserRpcServiceAsync {

	void login(String email, String password, AsyncCallback<MyUser> callback);

	void register(String email, String password, AsyncCallback<MyUser> callback);

	void logout(MyUser user, AsyncCallback<Void> callback);

	void login(String requestUri, AsyncCallback<MyUser> callback);

	void login(MyUser user, AsyncCallback<MyUser> callback);

	void getAll(AsyncCallback<List<MyUser>> callback);

	void update(MyUser user, AsyncCallback<Void> callback);

	void searchFor(String searchFor, AsyncCallback<List<MyUser>> callback);

	void addPendingFriend(MyUser pendingFriend, List<MyUser> targets,
			AsyncCallback<Void> callback);

	void postOnFriend(MyUser source, MyUser target, PostingThread thread,
			AsyncCallback<Void> callback);

	void acceptFriends(MyUser user, List<MyUser> newFriends,
			AsyncCallback<Void> callback);

}
